<template>
	<view>
		<view class="edgeInsetTop"></view>
		<view class="wanlian">
			<image :src="$wanlshop.oss(common.appConfig.app_logo)" mode="aspectFill"></image>
			<view class="text-bold text-xxl margin-top-lg">{{common.appConfig.name}}</view>
			<view class="text-lg margin-top-xs wanl-gray">V{{common.version}}_{{common.versionCode}}</view>
		</view>

		<view class="cu-list menu margin-xl">
			<view class="cu-item arrow" @tap="onDetails(common.appConfig.user_agreement, '用户协议')">
				<view class="content">
					<text>特别声明</text>
				</view>
			</view>
			<!-- 版本更新&评分 后续版本更新 -->
			<view class="cu-item arrow">
				<view class="content" @tap="$wanlshop.to(`/pages/user/help`)">
					<text>使用帮助</text>
				</view>
			</view>
			<view class="cu-item arrow" @tap="update">
				<view class="content" >
					<text>版本更新</text>
				</view>
			</view>
		</view>
		<view class="footer">
			<view class="margin-bottom text-orange">
				<text @tap="onDetails(common.appConfig.user_agreement, '用户协议','singlepage')">《用户协议》</text>
				<text class="text-black">和</text><text @tap="onDetails(common.appConfig.privacy_protection, '隐私保护','singlepage')">《隐私权保护声明》</text>
			</view>
			<view class="text-gray">Copyright © {{common.appConfig.copyright}}</view>
			<view class="text-gray">{{common.appConfig.name}} 版权所有</view>
		</view>
		
		<!-- #ifdef APP-PLUS -->
		<wanl-appversion ref="appversion"></wanl-appversion>
		<!-- #endif -->
	</view>
</template>

<script>
import {mapState} from 'vuex';
export default {
	data() {
		return {};
	},
	onLoad() {
		
	},
	computed: {
		...mapState(['common'])
	},
	methods: {
		// 更新
		update(){
			// #ifdef APP-PLUS
			this.$refs.appversion.update()
			// #endif
			// #ifndef APP-PLUS
			this.$wanlshop.msg(`当前 ${this.$store.state.common.version} 最新，暂无新版本更新！`);
			// #endif
		}
	}
};
</script>

<style>
page {
	background-color: #fff;
}
.wanlian {
	display: flex;
	align-items: center; /* 垂直居中 */
	justify-content: center; /* 水平居中 */
	flex-direction: column;
	padding-top: 80rpx;
	padding-bottom: 60rpx;
}

.wanlian > image {
	height: 130rpx;
	width: 130rpx;
}

.footer {
	display: flex;
	align-items: center; /* 垂直居中 */
	justify-content: center; /* 水平居中 */
	flex-direction: column;
	position: fixed;
	bottom: 100rpx;
	font-size: 24rpx;
	width: 100%;
}
</style>
